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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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