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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.v: B = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.v: B = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

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

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

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