class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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