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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: D = None
        self.w: D = None
        self.q: F = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: F = None
        self.y: F = None
        self.s: F = None
        self.x: B = None
        self.o: C = None
        self.z: H = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.w: E = None
        self.y: B = None
        self.z: D = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: F = None
        self.s: E = None
        self.z: H = None
        self.u: A = None
        self.o: E = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.txt = txt

c = A("c")
n = B("n")
b = C("b")
f = D("f")
e = E("e")
k = F("k")
j = G("j")
h = H("h")
i = G("i")

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: D = None
        self.w: D = None
        self.q: F = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: F = None
        self.y: F = None
        self.s: F = None
        self.x: B = None
        self.o: C = None
        self.z: H = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.w: E = None
        self.y: B = None
        self.z: D = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: F = None
        self.s: E = None
        self.z: H = None
        self.u: A = None
        self.o: E = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.txt = txt

c = A("c")
n = B("n")
b = C("b")
f = D("f")
e = E("e")
k = F("k")
j = G("j")
h = H("h")
i = G("i")

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