class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.txt = txt

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

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

j = A("j")
h = B("h")
i = C("i")
k = D("k")
f = E("f")
m = F("m")
a = G("a")
l = F("l")
c = F("c")
e = F("e")

j.s = k
h.v = i
h.r = i
h.t = a
h.q = a
i.u = j
i.t = a
k.r = h
f.p = i
f.y = h
m.w = l
m.u = h
m.p = h
m.y = i
m.x = i
m.q = k
a.u = h
a.v = k
l.w = m
l.u = h
l.p = h
l.y = i
l.x = i
l.q = k
c.w = l
c.u = h
c.p = h
c.y = i
c.x = i
c.q = k
e.w = l
e.u = h
e.p = h
e.y = i
e.x = i
e.q = k
assert c.p.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.txt = txt

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

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

j = A("j")
h = B("h")
i = C("i")
k = D("k")
f = E("f")
m = F("m")
a = G("a")
l = F("l")
c = F("c")
e = F("e")

j.s = k
h.v = i
h.r = i
h.t = a
h.q = a
i.u = j
i.t = a
k.r = h
f.p = i
f.y = h
m.w = l
m.u = h
m.p = h
m.y = i
m.x = i
m.q = k
a.u = h
a.v = k
l.w = m
l.u = h
l.p = h
l.y = i
l.x = i
l.q = k
c.w = l
c.u = h
c.p = h
c.y = i
c.x = i
c.q = k
e.w = l
e.u = h
e.p = h
e.y = i
e.x = i
e.q = k
assert c.p.r.u.txt == "j"