class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.y: E = None
        self.p: B = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.r: E = None
        self.v: E = None
        self.s: D = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.r: E = None
        self.v: E = None
        self.s: D = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: G = None
        self.txt = txt

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

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

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