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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

f = A("f")
b = B("b")
h = C("h")
e = D("e")
m = E("m")
c = F("c")
j = G("j")
a = H("a")

f.o = j
f.r = h
f.z = h
f.w = a
f.s = a
f.x = b
f.v = m
b.v = f
b.z = f
h.t = m
h.q = m
h.z = b
h.p = b
h.u = e
e.y = f
e.w = h
e.p = h
m.o = j
c.s = h
c.o = f
c.y = j
j.o = e
a.t = h
a.s = f
assert j.o.y.x.v.r.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: C = None
        self.w: H = None
        self.x: B = None
        self.z: C = None
        self.v: E = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

f = A("f")
b = B("b")
h = C("h")
e = D("e")
m = E("m")
c = F("c")
j = G("j")
a = H("a")

f.o = j
f.r = h
f.z = h
f.w = a
f.s = a
f.x = b
f.v = m
b.v = f
b.z = f
h.t = m
h.q = m
h.z = b
h.p = b
h.u = e
e.y = f
e.w = h
e.p = h
m.o = j
c.s = h
c.o = f
c.y = j
j.o = e
a.t = h
a.s = f
assert j.o.y.x.v.r.q.o.txt == "j"