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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.q: F = None
        self.v: A = None
        self.u: A = None
        self.z: A = None
        self.o: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.q: F = None
        self.v: A = None
        self.u: A = None
        self.z: A = None
        self.o: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: A = None
        self.txt = txt

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

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