class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: C = None
        self.w: F = None
        self.t: G = None
        self.v: G = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.z: G = None
        self.p: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.y: C = None
        self.u: C = None
        self.r: F = None
        self.v: C = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: D = None
        self.r: F = None
        self.s: F = None
        self.u: A = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

b = A("b")
d = B("d")
l = C("l")
i = D("i")
c = E("c")
h = F("h")
n = G("n")
m = F("m")

b.y = n
b.t = n
b.v = n
b.p = n
b.q = l
b.w = h
b.s = h
d.o = i
d.x = b
d.p = b
d.z = n
d.w = n
l.q = i
l.r = n
l.p = n
i.p = m
i.r = m
i.q = m
i.w = d
i.y = l
i.u = l
i.v = l
c.x = n
c.r = l
c.s = i
h.r = c
h.s = m
h.o = l
n.x = l
n.p = i
n.r = h
n.v = h
n.y = h
n.s = m
n.u = b
m.r = c
m.s = h
m.o = l
assert d.x.y.s.s.r.x.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: C = None
        self.w: F = None
        self.t: G = None
        self.v: G = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.z: G = None
        self.p: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.y: C = None
        self.u: C = None
        self.r: F = None
        self.v: C = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: D = None
        self.r: F = None
        self.s: F = None
        self.u: A = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

b = A("b")
d = B("d")
l = C("l")
i = D("i")
c = E("c")
h = F("h")
n = G("n")
m = F("m")

b.y = n
b.t = n
b.v = n
b.p = n
b.q = l
b.w = h
b.s = h
d.o = i
d.x = b
d.p = b
d.z = n
d.w = n
l.q = i
l.r = n
l.p = n
i.p = m
i.r = m
i.q = m
i.w = d
i.y = l
i.u = l
i.v = l
c.x = n
c.r = l
c.s = i
h.r = c
h.s = m
h.o = l
n.x = l
n.p = i
n.r = h
n.v = h
n.y = h
n.s = m
n.u = b
m.r = c
m.s = h
m.o = l
assert d.x.y.s.s.r.x.x.p.txt == "n"