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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.y: E = None
        self.p: E = None
        self.o: G = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

g = A("g")
c = B("c")
e = C("e")
l = D("l")
b = E("b")
f = F("f")
n = G("n")
m = H("m")
j = C("j")
k = G("k")

g.w = c
g.q = c
g.s = l
g.z = m
g.x = b
g.r = f
c.q = m
e.w = f
e.z = j
l.u = e
l.t = m
l.w = m
l.x = j
b.t = l
b.w = e
f.z = g
f.p = b
n.o = l
m.x = f
m.s = f
m.y = b
m.p = b
m.o = n
m.r = l
m.w = e
j.w = f
j.z = e
k.o = l
assert e.z.w.p.t.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: D = None
        self.q: B = None
        self.z: H = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.y: E = None
        self.p: E = None
        self.o: G = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

g = A("g")
c = B("c")
e = C("e")
l = D("l")
b = E("b")
f = F("f")
n = G("n")
m = H("m")
j = C("j")
k = G("k")

g.w = c
g.q = c
g.s = l
g.z = m
g.x = b
g.r = f
c.q = m
e.w = f
e.z = j
l.u = e
l.t = m
l.w = m
l.x = j
b.t = l
b.w = e
f.z = g
f.p = b
n.o = l
m.x = f
m.s = f
m.y = b
m.p = b
m.o = n
m.r = l
m.w = e
j.w = f
j.z = e
k.o = l
assert e.z.w.p.t.u.z.txt == "j"