class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: E = None
        self.y: G = None
        self.x: D = None
        self.u: G = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.y: A = None
        self.x: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.y: A = None
        self.x: G = None
        self.txt = txt

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

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