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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: F = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: F = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.z: D = None
        self.t: D = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: F = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: F = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.z: D = None
        self.t: D = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

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

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