class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: A = None
        self.o: A = None
        self.z: F = None
        self.u: A = None
        self.q: E = None
        self.r: D = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: E = None
        self.p: C = None
        self.s: D = None
        self.t: C = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.p: E = None
        self.w: A = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

e = A("e")
a = B("a")
f = C("f")
h = D("h")
c = E("c")
l = F("l")
m = G("m")
g = H("g")

e.w = a
e.q = l
e.y = h
e.r = m
a.u = c
f.s = l
f.z = l
f.w = e
f.o = e
f.u = e
f.q = c
f.y = c
f.r = h
h.r = a
c.x = l
c.r = g
l.y = f
l.o = f
l.w = h
l.u = c
l.z = m
l.v = m
m.r = e
m.u = c
m.p = f
m.t = f
m.s = h
m.y = a
g.x = h
g.q = h
g.t = l
g.p = c
g.w = e
g.z = e
assert c.x.w.r.u.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: A = None
        self.o: A = None
        self.z: F = None
        self.u: A = None
        self.q: E = None
        self.r: D = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: E = None
        self.p: C = None
        self.s: D = None
        self.t: C = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.p: E = None
        self.w: A = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

e = A("e")
a = B("a")
f = C("f")
h = D("h")
c = E("c")
l = F("l")
m = G("m")
g = H("g")

e.w = a
e.q = l
e.y = h
e.r = m
a.u = c
f.s = l
f.z = l
f.w = e
f.o = e
f.u = e
f.q = c
f.y = c
f.r = h
h.r = a
c.x = l
c.r = g
l.y = f
l.o = f
l.w = h
l.u = c
l.z = m
l.v = m
m.r = e
m.u = c
m.p = f
m.t = f
m.s = h
m.y = a
g.x = h
g.q = h
g.t = l
g.p = c
g.w = e
g.z = e
assert c.x.w.r.u.r.t.txt == "l"