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

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

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

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

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

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

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

k = A("k")
m = B("m")
i = C("i")
b = D("b")
h = E("h")
g = F("g")
f = G("f")
j = G("j")
a = G("a")

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

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

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

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

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

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

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

k = A("k")
m = B("m")
i = C("i")
b = D("b")
h = E("h")
g = F("g")
f = G("f")
j = G("j")
a = G("a")

k.q = g
k.w = h
k.r = b
m.w = b
m.s = b
m.z = g
m.u = g
m.x = i
i.r = g
b.w = i
h.y = b
h.q = j
h.s = a
g.v = b
g.u = i
f.z = h
f.x = b
f.y = b
f.v = m
f.t = j
j.z = h
j.x = b
j.y = b
j.v = m
j.t = a
a.z = h
a.x = b
a.y = b
a.v = m
a.t = f
assert m.u.u.r.v.txt == "b"