class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: G = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.z: C = None
        self.o: E = None
        self.t: C = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.v: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: C = None
        self.txt = txt

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

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

j.y = c
j.q = b
j.w = b
j.o = l
i.v = b
i.p = l
i.o = j
i.u = h
i.w = g
c.t = d
d.y = g
d.u = g
d.o = g
d.z = c
d.t = c
d.q = l
g.z = l
g.v = l
g.q = c
g.w = d
h.w = b
h.z = c
b.z = c
b.y = c
b.p = g
b.q = j
b.r = h
l.y = g
l.u = g
l.o = g
l.z = c
l.t = c
l.q = d
assert i.v.z.t.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: G = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.z: C = None
        self.o: E = None
        self.t: C = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.v: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: C = None
        self.txt = txt

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

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

j.y = c
j.q = b
j.w = b
j.o = l
i.v = b
i.p = l
i.o = j
i.u = h
i.w = g
c.t = d
d.y = g
d.u = g
d.o = g
d.z = c
d.t = c
d.q = l
g.z = l
g.v = l
g.q = c
g.w = d
h.w = b
h.z = c
b.z = c
b.y = c
b.p = g
b.q = j
b.r = h
l.y = g
l.u = g
l.o = g
l.z = c
l.t = c
l.q = d
assert i.v.z.t.q.t.txt == "c"