class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.y: C = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: F = None
        self.p: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.v: G = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: C = None
        self.u: E = None
        self.y: B = None
        self.x: E = None
        self.v: F = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.r: B = None
        self.u: B = None
        self.z: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.p: C = None
        self.y: E = None
        self.v: B = None
        self.o: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: B = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: F = None
        self.p: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.v: G = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: C = None
        self.u: E = None
        self.y: B = None
        self.x: E = None
        self.v: F = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.r: B = None
        self.u: B = None
        self.z: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.p: C = None
        self.y: E = None
        self.v: B = None
        self.o: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: B = None
        self.s: A = None
        self.txt = txt

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

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