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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: G = None
        self.p: C = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

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

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

f.t = a
f.u = a
f.y = j
f.v = k
f.o = n
a.t = c
a.u = c
a.p = b
a.x = j
a.y = m
a.w = m
a.q = m
m.o = a
m.u = b
j.s = k
j.o = l
j.u = a
c.q = j
c.y = f
c.w = f
b.u = l
b.w = n
b.p = m
b.q = m
b.y = a
l.x = j
l.y = a
l.t = a
l.q = f
l.o = m
n.x = j
n.y = a
n.t = a
n.q = k
n.o = m
k.t = a
k.u = a
k.y = j
k.v = f
k.o = l
assert a.t.w.v.y.s.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: D = None
        self.v: A = None
        self.o: G = None
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: G = None
        self.p: C = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

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

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

f.t = a
f.u = a
f.y = j
f.v = k
f.o = n
a.t = c
a.u = c
a.p = b
a.x = j
a.y = m
a.w = m
a.q = m
m.o = a
m.u = b
j.s = k
j.o = l
j.u = a
c.q = j
c.y = f
c.w = f
b.u = l
b.w = n
b.p = m
b.q = m
b.y = a
l.x = j
l.y = a
l.t = a
l.q = f
l.o = m
n.x = j
n.y = a
n.t = a
n.q = k
n.o = m
k.t = a
k.u = a
k.y = j
k.v = f
k.o = l
assert a.t.w.v.y.s.u.p.txt == "b"