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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: A = None
        self.q: F = None
        self.z: B = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: A = None
        self.q: F = None
        self.z: B = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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