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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.r: F = None
        self.w: B = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

g = A("g")
k = B("k")
j = C("j")
l = D("l")
b = E("b")
h = F("h")

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.r: F = None
        self.w: B = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

g = A("g")
k = B("k")
j = C("j")
l = D("l")
b = E("b")
h = F("h")

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