class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.t: D = None
        self.p: G = None
        self.r: E = None
        self.q: G = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.v: F = None
        self.z: G = None
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: D = None
        self.u: G = None
        self.w: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.v: F = None
        self.z: G = None
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: D = None
        self.u: G = None
        self.w: E = None
        self.txt = txt

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

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

b.u = m
b.z = l
b.t = n
b.p = f
b.q = f
b.r = g
b.y = d
j.t = f
j.r = f
j.z = f
j.v = d
j.x = m
l.p = n
l.o = f
l.q = m
n.v = j
n.o = j
g.w = b
d.t = l
d.s = m
d.u = f
d.w = c
f.z = b
f.t = j
c.w = b
m.v = j
m.o = j
assert g.w.z.p.v.v.w.w.q.txt == "f"