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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.p: 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.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.t: A = None
        self.r: C = None
        self.y: E = None
        self.txt = txt

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

j = A("j")
n = B("n")
a = C("a")
e = D("e")
f = E("f")
d = F("d")
b = G("b")
i = A("i")
l = B("l")

j.u = d
j.s = e
j.z = e
j.t = a
j.w = a
n.r = j
n.p = b
a.z = n
a.r = d
a.p = b
e.r = n
f.o = b
d.x = l
d.q = l
d.t = i
d.r = a
d.y = f
b.r = e
i.u = d
i.s = e
i.z = e
i.t = a
i.w = a
l.r = i
l.p = b
assert e.r.p.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: D = None
        self.t: C = None
        self.z: D = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.p: 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.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.t: A = None
        self.r: C = None
        self.y: E = None
        self.txt = txt

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

j = A("j")
n = B("n")
a = C("a")
e = D("e")
f = E("f")
d = F("d")
b = G("b")
i = A("i")
l = B("l")

j.u = d
j.s = e
j.z = e
j.t = a
j.w = a
n.r = j
n.p = b
a.z = n
a.r = d
a.p = b
e.r = n
f.o = b
d.x = l
d.q = l
d.t = i
d.r = a
d.y = f
b.r = e
i.u = d
i.s = e
i.z = e
i.t = a
i.w = a
l.r = i
l.p = b
assert e.r.p.r.r.txt == "n"