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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.p: A = None
        self.z: C = None
        self.o: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.p: A = None
        self.z: C = None
        self.o: F = None
        self.w: D = None
        self.txt = txt

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

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