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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.u: G = None
        self.p: G = None
        self.w: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: G = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.s: C = None
        self.w: E = None
        self.y: D = None
        self.o: A = None
        self.txt = txt

j = A("j")
l = B("l")
a = C("a")
k = D("k")
c = E("c")
h = F("h")
n = G("n")

j.z = h
j.u = h
l.s = c
l.w = c
l.o = k
l.u = n
l.p = n
a.o = l
a.q = h
a.r = n
k.x = n
c.o = a
h.q = l
h.t = n
h.z = c
n.z = c
n.w = c
n.r = j
n.o = j
n.s = a
n.y = k
assert h.z.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.u: G = None
        self.p: G = None
        self.w: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: G = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.s: C = None
        self.w: E = None
        self.y: D = None
        self.o: A = None
        self.txt = txt

j = A("j")
l = B("l")
a = C("a")
k = D("k")
c = E("c")
h = F("h")
n = G("n")

j.z = h
j.u = h
l.s = c
l.w = c
l.o = k
l.u = n
l.p = n
a.o = l
a.q = h
a.r = n
k.x = n
c.o = a
h.q = l
h.t = n
h.z = c
n.z = c
n.w = c
n.r = j
n.o = j
n.s = a
n.y = k
assert h.z.o.o.txt == "l"