class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: G = None
        self.z: G = None
        self.t: F = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: H = None
        self.q: A = None
        self.y: F = None
        self.v: E = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.txt = txt

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

h.r = c
h.t = c
h.o = j
h.z = j
h.y = b
f.x = e
f.w = k
f.q = k
f.z = k
f.t = c
f.r = c
f.s = l
b.q = h
b.r = l
l.r = e
l.v = e
l.u = k
l.q = h
l.t = h
l.y = c
e.u = j
e.t = j
e.o = f
e.x = c
e.v = c
c.w = k
j.o = h
j.w = b
j.p = b
k.t = e
k.p = j
assert e.t.o.y.q.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: G = None
        self.z: G = None
        self.t: F = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: H = None
        self.q: A = None
        self.y: F = None
        self.v: E = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.txt = txt

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

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