class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.u: G = None
        self.r: C = None
        self.w: D = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: G = None
        self.p: D = None
        self.w: A = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: G = None
        self.z: B = None
        self.s: D = None
        self.t: G = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: G = None
        self.p: D = None
        self.w: A = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: G = None
        self.z: B = None
        self.s: D = None
        self.t: G = None
        self.w: A = None
        self.txt = txt

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

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

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

k.x = m
k.w = m
k.z = b
k.y = b
k.u = d
k.r = f
b.o = l
b.s = d
b.p = m
b.w = k
b.v = g
b.q = g
l.v = f
l.p = f
l.o = k
l.t = m
l.y = g
l.z = d
m.r = d
m.p = a
g.r = l
g.y = d
g.t = d
g.z = b
g.s = m
g.w = k
a.z = m
a.u = m
a.o = g
a.s = l
d.z = a
d.t = a
f.v = l
f.p = l
f.o = k
f.t = m
f.y = g
f.z = d
assert f.y.w.r.o.r.o.u.txt == "d"