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

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

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

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

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

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

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

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

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

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

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

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

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

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

d.x = e
d.r = e
d.o = m
d.u = g
d.w = l
d.z = a
a.r = n
a.x = n
a.u = m
m.p = n
m.r = g
m.q = l
m.s = a
k.r = g
k.p = d
k.x = n
k.q = l
n.v = m
h.w = a
h.q = a
g.w = a
g.q = a
e.v = m
l.r = g
l.p = d
l.x = e
l.q = k
assert h.w.u.q.x.v.r.txt == "g"