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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: E = None
        self.x: A = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.t: A = None
        self.z: D = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.r: A = None
        self.w: C = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: E = None
        self.x: A = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.t: A = None
        self.z: D = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.r: A = None
        self.w: C = None
        self.o: F = None
        self.txt = txt

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

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

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

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