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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.p: E = None
        self.txt = txt

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

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

e.w = k
e.z = m
b.w = e
b.r = m
b.v = i
b.p = f
b.y = k
b.u = g
l.t = g
l.r = b
k.w = m
f.y = k
f.u = l
f.s = g
f.o = b
g.w = l
g.z = d
g.p = i
m.o = b
m.y = j
d.t = g
d.r = b
i.y = k
i.u = d
i.s = g
i.o = b
j.t = g
j.r = b
assert g.z.t.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.p: E = None
        self.txt = txt

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

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

e.w = k
e.z = m
b.w = e
b.r = m
b.v = i
b.p = f
b.y = k
b.u = g
l.t = g
l.r = b
k.w = m
f.y = k
f.u = l
f.s = g
f.o = b
g.w = l
g.z = d
g.p = i
m.o = b
m.y = j
d.t = g
d.r = b
i.y = k
i.u = d
i.s = g
i.o = b
j.t = g
j.r = b
assert g.z.t.p.u.txt == "d"