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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: E = None
        self.u: A = None
        self.y: C = None
        self.x: A = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

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

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

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

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

f = A("f")
c = B("c")
d = C("d")
e = D("e")
j = E("j")
m = F("m")
b = G("b")
n = C("n")
k = A("k")

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: E = None
        self.u: A = None
        self.y: C = None
        self.x: A = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

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

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

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

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

f = A("f")
c = B("c")
d = C("d")
e = D("e")
j = E("j")
m = F("m")
b = G("b")
n = C("n")
k = A("k")

f.u = k
f.r = m
f.x = m
f.v = j
c.p = f
c.y = f
c.r = b
c.q = k
c.t = m
d.r = m
d.p = m
d.s = j
d.u = f
d.y = n
d.x = k
d.o = b
e.o = n
e.z = n
j.o = e
m.p = k
b.s = m
n.r = m
n.p = m
n.s = j
n.u = f
n.y = d
n.x = k
n.o = b
k.u = f
k.r = m
k.x = m
k.v = j
assert j.o.z.o.s.p.u.r.txt == "m"