class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: F = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.q: E = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.q: E = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

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