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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.z: A = None
        self.q: A = None
        self.p: A = None
        self.x: B = None
        self.txt = txt

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

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

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

b.o = l
b.t = l
b.w = h
b.q = h
b.p = g
b.u = g
c.y = h
c.v = b
c.z = f
c.s = g
c.o = j
i.s = g
i.y = l
i.x = l
i.p = b
i.w = h
i.v = j
h.u = g
g.w = c
g.t = b
g.z = b
g.q = b
g.p = b
g.x = f
l.y = b
l.t = b
j.w = g
j.t = g
f.y = h
f.v = b
f.z = c
f.s = g
f.o = j
assert c.s.x.s.w.y.u.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: D = None
        self.q: D = None
        self.p: E = None
        self.u: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.z: A = None
        self.q: A = None
        self.p: A = None
        self.x: B = None
        self.txt = txt

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

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

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

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