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

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.r: C = None
        self.x: D = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: C = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

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

l.u = j
l.y = j
l.o = a
l.x = n
k.x = b
k.t = b
k.y = l
g.p = i
e.u = g
e.q = n
e.w = a
e.s = a
e.p = l
n.w = i
n.t = i
n.r = g
n.x = j
n.u = b
i.x = g
i.y = g
i.w = b
i.t = j
i.r = l
i.o = n
a.y = j
a.r = g
a.w = b
a.v = e
b.x = k
b.t = k
b.y = l
j.u = g
j.q = n
j.w = a
j.s = a
j.p = l
assert l.u.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.y: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.r: C = None
        self.x: D = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: C = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

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

l.u = j
l.y = j
l.o = a
l.x = n
k.x = b
k.t = b
k.y = l
g.p = i
e.u = g
e.q = n
e.w = a
e.s = a
e.p = l
n.w = i
n.t = i
n.r = g
n.x = j
n.u = b
i.x = g
i.y = g
i.w = b
i.t = j
i.r = l
i.o = n
a.y = j
a.r = g
a.w = b
a.v = e
b.x = k
b.t = k
b.y = l
j.u = g
j.q = n
j.w = a
j.s = a
j.p = l
assert l.u.p.x.txt == "n"