class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.x: G = None
        self.t: E = None
        self.r: C = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: A = None
        self.z: A = None
        self.v: F = None
        self.u: E = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.z: E = None
        self.o: B = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: A = None
        self.z: A = None
        self.v: F = None
        self.u: E = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.z: E = None
        self.o: B = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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