class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.q: D = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: E = None
        self.v: E = None
        self.w: F = None
        self.q: A = None
        self.s: E = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: E = None
        self.v: E = None
        self.w: F = None
        self.q: A = None
        self.s: E = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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