class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: B = None
        self.t: E = None
        self.y: D = None
        self.u: E = None
        self.s: A = None
        self.p: H = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.s: F = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.s: F = None
        self.p: D = None
        self.txt = txt

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

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