class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: F = None
        self.p: G = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.v: B = None
        self.u: E = None
        self.x: A = None
        self.r: D = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

k.r = n
k.p = n
k.z = c
k.q = c
k.y = f
f.y = c
f.s = a
b.u = f
m.x = b
a.u = m
a.q = m
a.p = f
a.y = n
c.p = n
c.t = f
c.x = b
n.p = a
n.y = a
n.u = a
n.v = f
n.q = f
n.x = k
n.r = m
h.x = b
assert c.x.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: F = None
        self.p: G = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.v: B = None
        self.u: E = None
        self.x: A = None
        self.r: D = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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