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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: F = None
        self.r: C = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: F = None
        self.r: C = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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