class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.o: G = None
        self.p: F = None
        self.u: D = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: E = None
        self.q: G = None
        self.r: A = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

c = A("c")
a = B("a")
g = C("g")
l = D("l")
j = E("j")
d = F("d")
b = G("b")
f = F("f")
n = F("n")

c.q = a
c.t = l
c.u = l
c.o = b
c.p = n
c.s = d
c.v = g
a.s = j
a.w = j
a.q = b
a.r = c
a.y = d
g.x = a
l.s = b
l.v = j
j.p = g
j.y = l
j.q = b
j.u = b
j.r = n
d.y = g
d.t = j
d.s = l
d.v = f
b.s = c
b.t = l
b.o = g
f.y = g
f.t = j
f.s = l
f.v = d
n.y = g
n.t = j
n.s = l
n.v = f
assert a.y.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.o: G = None
        self.p: F = None
        self.u: D = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: E = None
        self.q: G = None
        self.r: A = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

c = A("c")
a = B("a")
g = C("g")
l = D("l")
j = E("j")
d = F("d")
b = G("b")
f = F("f")
n = F("n")

c.q = a
c.t = l
c.u = l
c.o = b
c.p = n
c.s = d
c.v = g
a.s = j
a.w = j
a.q = b
a.r = c
a.y = d
g.x = a
l.s = b
l.v = j
j.p = g
j.y = l
j.q = b
j.u = b
j.r = n
d.y = g
d.t = j
d.s = l
d.v = f
b.s = c
b.t = l
b.o = g
f.y = g
f.t = j
f.s = l
f.v = d
n.y = g
n.t = j
n.s = l
n.v = f
assert a.y.y.x.txt == "a"