class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.t: D = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

g = A("g")
b = B("b")
f = C("f")
l = D("l")
n = E("n")
c = F("c")
j = A("j")
a = B("a")

g.r = c
g.w = l
g.t = l
g.v = l
g.z = b
b.s = j
b.y = a
b.p = g
f.u = l
f.s = a
l.t = j
l.q = g
l.p = c
n.u = c
c.u = a
c.r = n
c.q = n
j.r = c
j.w = l
j.t = l
j.v = l
j.z = a
a.s = g
a.p = g
a.y = b
assert c.u.y.y.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.t: D = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

g = A("g")
b = B("b")
f = C("f")
l = D("l")
n = E("n")
c = F("c")
j = A("j")
a = B("a")

g.r = c
g.w = l
g.t = l
g.v = l
g.z = b
b.s = j
b.y = a
b.p = g
f.u = l
f.s = a
l.t = j
l.q = g
l.p = c
n.u = c
c.u = a
c.r = n
c.q = n
j.r = c
j.w = l
j.t = l
j.v = l
j.z = a
a.s = g
a.p = g
a.y = b
assert c.u.y.y.s.r.txt == "c"