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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: F = None
        self.y: E = None
        self.z: D = None
        self.u: E = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: F = None
        self.y: E = None
        self.z: D = None
        self.u: E = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

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

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