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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: F = None
        self.w: D = None
        self.x: C = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: F = None
        self.w: D = None
        self.x: C = None
        self.o: D = None
        self.txt = txt

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

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

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

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