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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.r: D = None
        self.p: F = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: B = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.p: C = None
        self.u: B = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

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

j = A("j")
m = B("m")
i = C("i")
a = D("a")
l = E("l")
d = F("d")
c = G("c")

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.r: D = None
        self.p: F = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: B = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.p: C = None
        self.u: B = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

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

j = A("j")
m = B("m")
i = C("i")
a = D("a")
l = E("l")
d = F("d")
c = G("c")

j.p = d
j.o = m
m.u = j
m.p = j
m.s = d
m.o = a
m.z = a
m.x = c
m.y = l
i.s = c
i.t = c
i.z = l
i.r = a
i.p = d
i.y = d
a.u = l
a.q = j
l.u = a
l.t = m
l.r = c
l.v = c
d.w = j
d.v = l
d.q = l
d.p = i
d.u = m
d.y = a
c.x = l
assert l.v.x.t.txt == "m"