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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: G = None
        self.z: A = None
        self.q: C = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: D = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: G = None
        self.z: A = None
        self.q: C = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: D = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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