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

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

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

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

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

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

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

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

g.v = b
g.w = b
g.o = h
i.q = h
i.t = g
e.q = m
e.y = b
e.z = g
e.u = h
k.x = l
k.u = d
k.o = b
b.x = e
h.v = i
h.p = b
l.w = i
l.x = d
l.v = b
l.o = b
l.p = h
l.y = k
m.v = i
m.p = b
a.x = l
a.u = k
a.o = b
d.x = l
d.u = a
d.o = b
assert a.u.u.x.w.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

g.v = b
g.w = b
g.o = h
i.q = h
i.t = g
e.q = m
e.y = b
e.z = g
e.u = h
k.x = l
k.u = d
k.o = b
b.x = e
h.v = i
h.p = b
l.w = i
l.x = d
l.v = b
l.o = b
l.p = h
l.y = k
m.v = i
m.p = b
a.x = l
a.u = k
a.o = b
d.x = l
d.u = a
d.o = b
assert a.u.u.x.w.q.v.txt == "i"